		 <style>
		#ff{margin:20px auto;width:600px;}
		#ff tr{width:600px;height:30px;}
		#ff tr td{algin:left;}
		#ff tr td input{margin-left:10px;}
		#ff tr td span{margin-left:10px;}
		 </style>
		 <script>
		 var editor_a = new baidu.editor.ui.Editor();
        	editor_a.render( 'myEditor' );
		 $(document).ready(function(){
			 $("#sub").click(function(){
			 	 $('#ff').form('submit', {
				url:'<?=$actionurl?>',
			    onSubmit: function(){
			    	editor_a.sync();
					return true;
	   				  },
	     		 success:function(data){
	        		 	$.messager.alert('提示',data,'info');
	        		 		$("#win").window('close');
							$("#datas").datagrid('reload');

	   				 },
	   				 onLoadError:function(){
	   				 	$.messager.alert('提示','保存失败','info');
	   				 	$("#win").window('close');
	   				 	$("#datas").datagrid('reload');
	   				 }

	 				});
			 });


		 });

function category(ids,value)
		{
			$.get("<?=$categoryurl?>",{id:value},function(data){
				if(data)
				{
					idss = ids+1;
					data2 = "<select  onchange='category("+idss+",this.value)'  name='CategoryId"+idss+"'><option value=''>请选择</option>"+data+"</select>";
					$('#category'+idss).html(data2);
					if(idss==2)
					{
						$('#category3').html("");
						$('#category4').html("");
					}
					else if(idss==3)
					{
						$('#category4').html("");
					}
				}
			});
		}


		 </script>

		 <form id="ff" method="post">
		 <table>
		 <caption><?php if(isset($data['NewsId'])):?>修改信息<?php else:?>发布信息<?endif;?></caption>
	        <tr>
	            <td align="right">标题:</td>
	            <td><input class="easyui-validatebox" type="text" value="<?=isset($data['Title']) ? $data['Title'] : ''?>" name="Title" required="true" ></td>
	        </tr>
	        <tr>
	            <td align="right">分类:</td>
	            <td><select style="float:left;margin-left:10px;" id="category1" onchange="category(1,this.value)" name="CategoryId1" >
	            		<option value="">请选择</option>
	            		<?=$category?>
	            	 </select><span style="float:left;" id="category2"><?php if(isset($categorys[1]) && $categorys[1]):?><?=$categorys[1]?><?php endif; ?></span><span style="float:left;" id="category3"><?php if(isset($categorys[2]) && $categorys[2]):?><?=$categorys[2]?><?php endif; ?></span><span style="float:left;" id="category4"><?php if(isset($categorys[3]) && $categorys[3]):?><?=$categorys[3]?><?php endif; ?></span></td>
	        </tr>
	        <tr>
	            <td align="right">作者:</td>
	            <td><input class="easyui-validatebox" type="text" value="<?=isset($data['Autor']) ? $data['Autor'] : ''?>" name="Autor" ></td>
	        </tr>
	         <tr>
	            <td align="right">来源:</td>
	            <td><input class="easyui-validatebox" type="text" value="<?=isset($data['From']) ? $data['From'] : ''?>" name="From"></td>
	        </tr>
	        <tr>
	            <td align="right">发布时间:</td>
	            <td><input id='datetime' class="easyui-datetimebox"  value="<?=isset($data['Inputtime']) ? $data['Inputtime'] : date("Y-m-d h:m:s",time())?>" name="Inputtime"  style="width:150px"></td>
	        </tr>
	        <tr>
	            <td align="right">内容:</td>
	            <td>

	            <script type="text/plain" id="myEditor" style="width:500px" name="Content">
       			 <?=isset($data['Content']) ? $data['Content'] : ''?>
    			</script>

	            </td>
	        </tr>
  			<input type="hidden" name="NewsId" value="<?=isset($data['NewsId']) ? $data['NewsId'] : ''?>"/>
	        <tr>
	        <td></td>
	           <td> <input type="button" id="sub" value="保存"></td>
	        </tr>
	        </table>
	    </form>